package com.cloudlead.plugin.security.service;

import com.cloudlead.common.lang.security.LoginSource;
import com.cloudlead.common.worker.security.ScAuth;

/**
 * Created by dean on 2015/8/8.
 */
public interface AuthorizationService {
    /**
     * 获取令牌
     *
     * @param username
     * @param password
     * @param source
     * @param group
     * @param code
     * @return
     */
    ScAuth getToken( String username,
                    String password,LoginSource source,String group, String code);

    /**
     * 切换用户组
     * @param group
     */
    void changeGroup(String group);

    /**
     * 移除令牌
     */
    void removeToken();

    /**
     * 忘记密码
     *
     * @param mobile
     * @param code
     * @param password
     */
    void forgetPassword(String mobile, String code,
                        String password);

    /**
     * 获取验证码
     * @param mobile
     * @return
     */
    String getVerifyCode( String mobile);
}
